package main;

import java.io.IOException;

import textfileproces.RemoveQuotations;

public class Main {

    public static void main(String[] args ) {
    	int status = 0;
    	switch (args.length) {
    	case 0: case 1:
    		System.err.println("The program needs two arguments: " + 
    				"input and output file names." );
    		status = -1;
    		break;
    	}
    	RemoveQuotations processor = null;
    	if (status == 0) {
    		try {
				processor = new RemoveQuotations(args[0], args[1]);
	    		processor.run();
			} catch (IOException e) {
				status = -1;
				System.err.println(e.getMessage());
				e.printStackTrace();
			}
    	}
    	System.exit(status == -1 ? status : processor.getStatus());
    }

}
